package com.ks.core.framework.cpsupload.demos.pay;

import java.util.Map;

// 2. 统一业务响应对象
public class UnifiedResponse {
    private boolean success;
    private String code;      // 业务编码（SUCCESS, FAIL 等）
    private String message;   // 描述信息
    private Map<String, Object> data; // 统一业务数据

    // 成功响应工厂方法
    public static UnifiedResponse success(String message, Map<String, Object> data) {
        UnifiedResponse response = new UnifiedResponse();
        response.success = true;
        response.code = "SUCCESS";
        response.message = message;
        response.data = data;
        return response;
    }

    // 失败响应工厂方法
    public static UnifiedResponse fail(String code, String message) {
        UnifiedResponse response = new UnifiedResponse();
        response.success = false;
        response.code = code;
        response.message = message;
        return response;
    }
    
    // Getters
}